package com.v9.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.v9.system.domain.RoleInfo;
import com.v9.system.domain.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 用户表 数据层
 *
 * @author shilun
 */@Mapper
public interface UserInfoMapper extends BaseMapper<UserInfo>
{
    /**
     * 带分页条件查询用户*
     * @param params
     * @return
     */
    List<UserInfo> queryByPage(Map<String,Object> params);

    /**
     * 查询用户总数*
     * @param params
     * @return
     */
    Integer queryCountByParams(Map<String,Object> params);

    /**
     * 根据用户pin查找用户角色列表*
     * @param pin
     * @return
     */
    List<RoleInfo> queryRoleListById(@Param("pin") String pin);

    List<UserInfo> queryByRoleId(@Param("roleId") Long roleId);
}
